package com.ict.bills.service.impl;

import com.ict.bills.domain.User;
import com.ict.bills.mapper.UserMapper;
import com.ict.bills.service.UserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @Author: Lizbeth9421
 * @Date: 2021/10/10/0:28
 */
@Service
public class UserServiceImpl implements UserService {

    @Resource
    private UserMapper userMapper;

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return userMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(User record) {
        return userMapper.insert(record);
    }

    @Override
    public int insertSelective(User record) {
        return userMapper.insertSelective(record);
    }

    @Override
    public User selectByPrimaryKey(Integer id) {
        return userMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(User record) {
        return userMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(User record) {
        return userMapper.updateByPrimaryKey(record);
    }

    /**
     * 用于检查用户登录
     *
     * @param loginname
     * @param password
     * @return
     */
    @Override
    public User checkLogin(String loginname, String password) {
        return userMapper.checkLogin(loginname, password);
    }

}
